/*
 *    Copyright (c) 2018-2025, cloud All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: cloud
 */

package com.fuyao.cloud.asset.dto.warehous;

import cn.hutool.core.lang.tree.Tree;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fuyao.cloud.asset.entity.warehous.Warehous;
import com.fuyao.cloud.asset.entity.warehous.WarehousList;
import com.fuyao.cloud.common.core.util.DictItemOption;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.compress.utils.Lists;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 入库管理
 *
 * @author liyue
 * @date 2021-12-06 20:19:22
 */
@Data
@ApiModel(value = "入库管理")
public class WarehousCreateDTO {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "主键ID")
	private Long id;
	@ApiModelProperty(value = "唯一编码（用于关联附件）")
	private String unid;
	@ApiModelProperty(value = "入库人姓名")
	private String createBy;
	@ApiModelProperty(value = "创建时间")
	private LocalDateTime createTime;
	@ApiModelProperty(value = "入库人所属OU的ID")
	private Long deptId;
	@ApiModelProperty(value = "入库人所属OU的全称")
	private String deptFullname;
	@ApiModelProperty(value = "最后修改人信息")
	private String updateBy;
	@ApiModelProperty(value = "最后修改时间")
	private LocalDateTime updateTime;
	@ApiModelProperty(value = "入库人ID")
	private Long createId;
	@ApiModelProperty(value = "单据类型：默认为ALL{ DEVICE:资产类；CONSUMABLES：易耗品；All:混合}")
	private String type;
	@ApiModelProperty(value = "单号")
	private String caseid;
	@ApiModelProperty(value = "验收订单ID")
	private Long parentId;
	@ApiModelProperty(value = "单据性质用来区分是冲销还是入库（0入库单，1冲销单）")
	private String classify;
	@ApiModelProperty(value = "验收订单号")
	private String parentCaseid;
	@ApiModelProperty(value = "批次号")
	private String batchnumber;
	@ApiModelProperty(value = "合同或发票ID")
	private Long contractId;
	@ApiModelProperty(value = "合同或发票编号")
	private String contractNumber;
	@ApiModelProperty(value = "合同或发票名称")
	private String contractName;
	@ApiModelProperty(value = "状态：默认为0{0：草稿、3：已完成")
	private String status;
	@ApiModelProperty(value = "供应商ID")
	private Long supplierId;
	@ApiModelProperty(value = "供应商名称")
	private String supplierName;
	@ApiModelProperty(value = "入库时间")
	private LocalDateTime inTime;
	@ApiModelProperty(value = "存放房间名称")
	private String houseName;
	@ApiModelProperty(value = "存放房间ID")
	private Long houseId;
	@ApiModelProperty(value = "存放位置名称")
	private String locationName;
	@ApiModelProperty(value = "存放位置id")
	private Long locationId;
	@ApiModelProperty(value = "存放地点全名称")
	private String fullLocation;
	@ApiModelProperty(value = "采购方式01：邀标、02：自采:03：政府采购")
	private String method;
	@ApiModelProperty(value = "入库总价格")
	private BigDecimal amount;
	@ApiModelProperty(value = "货币类型默认人民币：人民币：、欧元：欧元、美元：美元、法元：法元")
	private String currencyType;
	@ApiModelProperty(value = "入库明细")
	private String detailed;
	@ApiModelProperty(value = "入库说明")
	private String explains;

	@ApiModelProperty(value = "入库明细")
	private List<WarehousList> warehousList;

	@ApiModelProperty(value = "字典集合")
	private DictOption dictOption;

	@Data
	public static class DictOption{
		@ApiModelProperty(value="状态可选项")
		private List<DictItemOption> statusList= Lists.newArrayList();

		@ApiModelProperty(value="采购方式可选项")
		private List<DictItemOption> purchaseWayList= Lists.newArrayList();

		@ApiModelProperty(value="货币类型可选项")
		private List<DictItemOption> currencyTypeList= Lists.newArrayList();

		@ApiModelProperty(value="合同树集合")
		private List<Tree<Long>> contractTreeList= Lists.newArrayList();

		@ApiModelProperty(value="供应商树集合")
		private List<Tree<Long>> supplierTreeList= Lists.newArrayList();

		@ApiModelProperty(value="部门树集合")
		private List<Tree<Integer>> deptTreeList = Lists.newArrayList();

		@ApiModelProperty(value="房间树集合")
		private List<Tree<String>> houseTreeList = Lists.newArrayList();

		@ApiModelProperty(value="房间树集合")
		private List<Tree<Long>> positionTreeList = Lists.newArrayList();
	}

}
